var element_id = "mailing";

function ajaxRequest(strResponseURL) {
	var httpObj = new Ajax.Request(
		strResponseURL, 
		{
			// method:'post',    // 기본값
			parameters:Form.serialize('mailing_subscribe'), 
			// onSuccess:displayJson,
			onSuccess:displayRaw, 
			onFailure:displayError
		}
	);
}


function displayRaw(responseHttpObj) {
	var returnData = responseHttpObj.responseText;
	$(element_id).innerHTML = decodeURIComponent(returnData);
}


function displayError() {
	// $(element_id).innerHTML = 'AJAX failed';
	alert("AJAX call failed.");
}
